$.ajax({
    type: 'get',
    url: '/employee/checkRootLogin',
    success: function(res) {
        // console.log(res);
        if (res.error == 400) {
            location.href = "login.html";
        }
    }

});

$(function() {


    $('.login_out_bot').on('click', function() {

        $.ajax({
            url: '/employee/employeeLogout',
            type: 'get',
            success: function(res) {
                // console.log(res);
                if (res.success) {
                    location.href = "login.html";
                } else {
                    alert('开小差了，抱歉客官');
                }
            }
        });

    });


    var navLi = $('.navs li')

    navLi.on('click', function() {

        $(this).find('ul').slideToggle();

    });

});